export const displayLoading = async (task) => {
  wx.showLoading({
    title: '加载中',
    mask: true,
  });
  try {
    return await task();
  } catch (error) {
    console.log('任务失败', error);
    throw error;
  } finally {
    wx.hideLoading();
  }
};
